package com.fm.financemanage.constant;

/**
 * @program: LazyAssistant
 * @description: 错误类型枚举
 * @author: tony
 * @create: 2019-12-09 18:01
 **/
public enum ResponseEnum {

    /**
     * 错误类型
     */
    SUCCESS("200", "成功", "操作成功", true, null),
    PAY_SUCCESS("200", "支付成功", "操作成功", true, null),


    FAIL("506", "失败", "操作失败", false, null),

    //用户相关 600-699
    USER_EXIST("601", "用户已存在", "用户已存在", false, null),
    LOST_OR_EXPIRE_TOKEN("604", "重新登录", "token缺失或过期，请重新登录", false, null),

    UNEXCEPTION("800", "请求错误", "请求错误", false, null),

    COMPANY_KEY_EMPTY("1001", "企业编号必填", "企业编号必填", false, null),
    ERROR_RATE_LIMIT("2002", "请求频繁", "请求频繁", false, null),
    ;


    private String code;

    private String name;

    private String memo;

    private Object data;

    private boolean result;

    ResponseEnum(String code, String name, String memo, boolean result, Object data) {
        this.code = code;
        this.name = name;
        this.memo = memo;
        this.result = result;
        this.data = data;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }
}
